package com.gary.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.gary.service.IHelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author pengrui
 * @date 2020/12/12 - 16:36
 */
@RestController
public class HelloController {

    @Reference
    private IHelloService helloService;

    @GetMapping(name = "/say", produces = "text/html;charset=utf-8")
    public String sayHello() {
        String s = helloService.sayHello();
        System.out.println(s);
        return "success"+s;
    }
}
